/*
 * @Description: 
 * @Date: 2024-05-31 10:23:02
 * @LastEditTime: 2024-06-05 16:08:38
 */
import request from '@/config/axios'

export interface PetitionRequestRecordVO {
                    id: number
                    type: string
                    name: string
                    content: string
                    idCard: string
                    phone: string
                    idCardUrl1: string
                    idCardUrl2: string
                    status: boolean
                    acceptUserName: string
                    acceptTime: Date
                    acceptUserId: number
                    acceptContent: string
                    auditingContent: string
                    auditingTime: Date
}

// 查询信访请求记录列表
export const getPetitionRequestRecordPage = async (params) => {
  return await request.get({ url: '/pro/petition-request-record/page', params })
}

// 查询信访请求记录详情
export const getPetitionRequestRecord = async (id: number) => {
  return await request.get({ url: '/pro/petition-request-record/get?id=' + id })
}

// 新增信访请求记录
export const createPetitionRequestRecord = async (data: PetitionRequestRecordVO) => {
  return await request.post({ url: '/pro/petition-request-record/create', data })
}

// 修改信访请求记录
export const updatePetitionRequestRecord = async (data) => {
  return await request.put({ url: '/pro/petition-request-record/update', data })
}

// 删除信访请求记录
export const deletePetitionRequestRecord = async (id: number) => {
  return await request.delete({ url: '/pro/petition-request-record/delete?id=' + id })
}

// 导出信访请求记录 Excel
export const exportPetitionRequestRecordApi = async (params) => {
  return await request.download({ url: '/pro/petition-request-record/export-excel', params })
}
